home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.cbm
- Path: undergrad.math.uwaterloo.ca!csbruce
- From: csbruce@ccnga.uwaterloo.ca (Craig Bruce)
- Subject: Re: anyone doing heavy math on a c64?
- Sender: news@undergrad.math.uwaterloo.ca (news spool owner)
- Message-ID: <DMsHCw.8G0@undergrad.math.uwaterloo.ca>
- Date: Wed, 14 Feb 1996 23:31:44 GMT
- References: <4e2l0q$n8f@turing.fwi.uva.nl> <4f49t9$2q5@madeline.INS.CWRU.Edu> <4fchhs$2r1@tor.abc.se> <4ftcnm$bfs@news.acns.nwu.edu>
- Nntp-Posting-Host: ccnga.uwaterloo.ca
- Organization: University of Waterloo, Canada (eh!)
-
- In article <4ftcnm$bfs@news.acns.nwu.edu>, Stephen Judd <sjudd@nwu.edu> wrote:
-
- >Peter T Karlsson <dat95pkn@idt.mdh.se> wrote:
- >>C=64+64*INT(.1+.9)
- >>
- >>will give C 64 for a C64 and 128 on a C128!
- >
- >I find this very interesting. Does anyone have an explanation for this?
-
- Floating-point arithmetic is a bit of a crap shoot anyway. Maybe they subtly
- changed the addition code between the two versions, or...
-
- >I started to investigate this further. On the 64 (at least, in 64 mode),
- >INT(.1+.9) returns 0, but A=.1+.9:?INT(A) returns 1. I started tracing through
- >the 128 ROMs, but not very rigorously (yet). I haven't solved the problem, but
- >I did discover something else very interesting:
-
- I have some vague notions about the floating-point accumulators (FACs)
- storing a number with slightly more precision than a floating-point
- variable, so this may be what is happening. If the number doesn't have to
- leave the FACs (which it doesn't in the above first example), then there may
- be a slightly different answer from if it does. Maybe the C128 stores or
- doesn't store intermediate results from the FACs while the C64 doesn't/
- does.
-
- Keep on Hackin'!
-
- -Craig Bruce
- csbruce@ccnga.uwaterloo.ca
- "That's a good choice, sir: why, I have the exact same model at home!"
- -- any untrustworthy sales-scum
-